﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace eSSP_example.Cpi
{
    public class Hopper
    {
        public int HopperId;              //    Hopper Id

        public string HopperCurrencyCode; //    Hopper Currency Code

        public int  CoinDenomination;     //    Hopper Coin Denomination  

        public string  CoinMint;          //    Hopper Coin Mint

        public int value;                 //    Hopper Inventory Value  

        /// <summary>
        /// 
        /// </summary>
        /// <param name="hopper"></param>
        public void CopyHopper(Hopper hopper)
        {
            this.HopperId           =   hopper.HopperId;
            this.CoinMint           =   hopper.CoinMint;
            this.HopperCurrencyCode =   hopper.HopperCurrencyCode;
            this.CoinDenomination   =   hopper.CoinDenomination;
            this.value              =   hopper.value;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public string HopperToString()
        {
            //  string strContent = string.Empty;

            StringBuilder sb = new StringBuilder();

            sb.Append("Id = ");
            sb.Append(this.HopperId.ToString());
            sb.Append(",Denom = ");
            sb.Append(this.CoinDenomination);
            sb.Append(",Mint = ");
            sb.Append(this.CoinMint);
            sb.Append(",Cur_Code = ");
            sb.Append(this.HopperCurrencyCode);
            sb.Append(",Value = ");
            sb.Append(this.value);

            //  strContent += "HopperId = " + this.HopperId.ToString();
            //  strContent += ",HopperCurrencyCode = " + this.HopperCurrencyCode;
            //  strContent += ",CoinDenomination = " + this.CoinDenomination;
            //  strContent += ",CoinMint = " + this.CoinMint;

            string strContent = sb.ToString();

            //MessageBox.Show(strContent, "HopperToString", MessageBoxButtons.OK);

            return  strContent;                 
        }
    }
}
